import * as VueRouter from 'vue-router'
import adminLayout from '@/adminLayout'
const routes = [
  {
    path: '/',
    component: () => import('@/views/mainPage.vue')
  },
  {
    path: '/admin',
    component: adminLayout,
    redirect: '/admin/students',
    children: [
      {
        path: 'students',
        component: () => import('@/views/admin/studentsPage.vue')
      },
      {
        path: 'classes',
        component: () => import('@/views/admin/classesPage.vue')
      },
      {
        path: 'homeworks',
        component: () => import('@/views/admin/homeworksPage.vue')
      }
    ]
  }
]

export default VueRouter.createRouter({
  history: VueRouter.createWebHashHistory(),
  routes
})
